<?php
require 'Model.php';
   class AdminModel extends Model{
        function __Construct(){
            parent::__Construct();
            $this->mod = 'admins';
        }

                function login(){

            $u=$_POST["adminname"];
            $p=$_POST["password"];
            $sql="select * from admins where adminname='$u'and password=('$p')";
            $rs=mysql_query($sql);

            $result=mysql_num_rows($rs);
            return $result;
        }



}
?>